//
//  CZPageView.h
//  ForChangZhou
//
//  Created by 蔺百好 on 2021/1/13.
//  Copyright © 2021 KMasker. All rights reserved.
//
#import <UIKit/UIKit.h>

#import "CZPageItem.h"
#import "CZPageConfig.h"

NS_ASSUME_NONNULL_BEGIN

@class CZPageView;
@protocol CZPageViewDelegate <NSObject>

- (void)pageViewSelectdIndex:(NSInteger)index
                   withModel:(CZTopSegMentItemModel *)model
                withPageView:(CZPageView *)pageView;

@end


@interface CZPageView : UIView

// 非空，必传
@property (nonatomic, strong) CZPageConfig * config;

@property (nonatomic, strong) NSArray <CZTopSegMentItemModel *> * itemArray;

@property (nonatomic, weak) id<CZPageViewDelegate>  delegate;

// 关联的滚动视图
@property (nonatomic ,strong) UIScrollView * relationScrollView;


@property (nonatomic, assign) NSInteger  current;

// 手动切换当前主题颜色
- (void)refreshSegmentTheme;

// 替换某个标题
- (void)refreshTitle:(NSString *)title withIndex:(NSInteger)index;

@end

NS_ASSUME_NONNULL_END
